﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SignalGen
{
    internal enum TaskType
    {
        freq,
        wave,
        phase,
        offset,
        amp,
        sweep,
        cursor
    }

    internal class Task
    {
        public TaskType type;
    }

    internal class WaveTask : Task
    {
        public byte[] wave;
        public WaveTask(byte[] wave)
        {
            this.type = TaskType.wave;
            this.wave = wave;
        }
    }

    internal class FreqTask : Task
    {
        public double freq;

        public FreqTask(double freq)
        {
            this.type = TaskType.freq;
            this.freq = freq;
        }
    }

    internal class PhaseTask : Task
    {
        public double phase;
        public PhaseTask(double phase)
        {
            this.type = TaskType.phase;
            this.phase = phase;
        }
    }

    internal class OffsetTask : Task
    {
        public int offset;
        public OffsetTask(int offset)
        {
            this.type = TaskType.offset;
            this.offset = offset;
        }
    }

    internal class AmpTask : Task
    {
        public int amp;
        public AmpTask(int amp)
        {
            this.type = TaskType.amp;
            this.amp = amp;
        }
    }

    internal class SweepTask : Task
    {
        public double startfreq;
        public double endfreq;
        public double cursorfreq;
        public byte mode;

        public SweepTask(double startfreq, double endfreq, double cursorfreq, byte mode)
        {
            this.type = TaskType.sweep;
            this.startfreq = startfreq;
            this.endfreq = endfreq;
            this.cursorfreq = cursorfreq;
            this.mode = mode;
        }
    }
}
